﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Data;

namespace Presentation
{
    public partial class Matricula : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnCadastrar_Click(object sender, EventArgs e)
        {
            TBTurmaAluno obj = new TBTurmaAluno();

            obj.idAluno = Convert.ToInt32(ddlAluno.SelectedValue);
            obj.idTurma = Convert.ToInt32(ddlTurma.SelectedValue);

           

            using (DBUCNEntities banco = new DBUCNEntities())
            {
                banco.AddToTBTurmaAlunoes(obj);
                banco.SaveChanges();
            }
        }
    }
}